// 创建一个路由器，并暴露出去
// 第一步：引入createRouter
import {createRouter, createWebHistory} from 'vue-router'
// 引入一个一个可能要呈现组件

import Admin from "@/views/Admin.vue";
import Project from "@/views/Project.vue";
import Login from "@/views/Login.vue";
import Layout from "@/views/layout.vue";
import Contest from "@/views/Contest.vue"
import Researchers from "@/views/Researchers.vue";
import Echarts from "@/views/Echarts.vue"
import Log from "@/views/Log.vue";
import Exam from "@/views/Exam.vue";
import ResearchersLayout from "@/views/ResearchersLayout.vue";
import Process from "@/views/Process.vue";
//创建路由器
const router = createRouter({
    history: createWebHistory(),
    routes: [
        {path: '/login', component: Login},
        {
            path: '/', component: Layout, children: [
                {path: '/project', component: Project},
                //{path: '/admin', component: Admin},
                {path: '/contest', component: Contest},
                {path: '/echarts', component: Echarts},
                {path: '/log', component: Log},
                {path: '/exam', component: Exam}
            ]
        },
        {
            path: '/researchersLayout', component: ResearchersLayout, children: [
                {path: '/researchers', component: Researchers},
                {path: '/process', component: Process}
            ]
        }
    ]
})

// 暴露出去router
export default router